package com.lili.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.*;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName tbl_log
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("日志类")
@TableName("tbl_log")
public class Log implements Serializable {
    /**
     * 日志主键编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 日志内容
     */
    @TableField("log_content")
    private String logContent;


    /**
     * 日志操作人
     */
    @TableField("username")
    private String username;

    /**
     * 操作人编号
     */
    @TableField("create_user")
    private Integer createUser;

    /**
     * 是否是登录
     */
    @TableField("is_login")
    private Integer isLogin;

    /**
     * 日志创建时间
     */
    @ApiModelProperty("日志操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    private static final long serialVersionUID = 1L;


    public Log(String logContent, String username, Integer createUser, Integer isLogin, Date createTime) {
        this.logContent = logContent;
        this.username = username;
        this.createUser = createUser;
        this.isLogin = isLogin;
        this.createTime = createTime;
    }
}